<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@include file="/common/common_taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>梦网工具本</title>
<jsp:include page="/WEB-INF/pages/include/head.jsp"></jsp:include>
<link href="/css/code.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/codeupdate.js"></script>
<script type="text/javascript" src="/js/ajaxfileupload.js"></script>
<script type="text/javascript" src="/edit-area-mini/edit_area_full.js"></script>
</head>
<body class="off-nav">
	<jsp:include page="/WEB-INF/pages/fc/include/nav.jsp"></jsp:include>
	<div id="main-div">
		<h4 style="text-align: center;color: blue;">修改代码</h4>
		<form class="add-form">
			<table>
				<tr>
					<td class="td1">缩览图　</td>
					<td class="td2">
						<div class="look-photo-area" id="img-area">
							空
						</div>
						<div class="look-photo-form-input">
							<i class="cus-information"></i>
							<span style="color:green;font-size: 12px;line-height: 14px;">支持格式png,jpg,gif,大小支持2M;最好是正方形尺寸。
								<br/>　 上传后，由于网络问题可能无法立即显示。
							</span>
							<input type="hidden" id="look_photo-type" value="code"/>
							<input id="look_photo_input" type="file" required="required" name="lookPhoto"/>
							<a class="btn btn-sm btn-success" id="btn_look_photo" href="javascript:void(0);">修改缩览图</a>
							<a id="refersh-img" href="javascript:void(0);" class="btn btn-primary btn-sm">刷新缩览图</a>
						</div>
					</td>
					<td class="td3" id="look_photo_res">
						${lookPhotoFilePath_info }
					</td>
				</tr>
			</table>
		</form>
		<form action="/code/update" method="post" class="add-form">
			<!-- 隐藏域 -->
			<input name="id" type="hidden" value="${code.get('id') }"/>
			<input type="hidden" id="lookPhotoFilePath" name="lookPhotoFilePath" value="${code.get('lookPhoto') }${lookPhotoFilePath }"/>
			<table>
				<tr>
					<td class="td1">标题　</td>
					<td class="td2"><input class="unit" type="text" name="title" placeholder="请输入代码标题，[1-24]" value="${code.get('title') }${title }"/></td>
					<td class="td3">${title_info }</td>
				</tr>
				
				<tr>
					<td class="td1">摘要　</td>
					<td class="td2"><textarea rows="4" cols="60" name="note" placeholder="请输入代码的摘要(介绍)，[1-120]">${code.get('note') }${note }</textarea></td>
					<td class="td3">${note_info }</td>
				</tr>
				<tr>
					<td class="td1">代码类型　</td>
					<td class="td2">
						<input type="hidden" id="codeType" value="${code.get('codeType') }${codeType }"/>
						<select id="codeTypeSelect" style="width:140px;" name="codeType">
							<option value="null">---请选择---</option>
							<option value="c">c</option>
							<option value="css">css</option>
							<option value="html">html</option>
							<option value="java">java</option>
							<option value="javascript">javascript</option>
							<option value="php">php</option>
							<option value="python">python</option>
							<option value="ruby">ruby</option>
							<option value="sql">sql</option>
							<option value="xml">xml</option>
							<option value="Other">Other</option>
						</select>
					</td>
					<td class="td3">${codeType_info }</td>
				</tr>
				<tr>
					<td class="td1">标签　</td>
					<td class="td2"><input class="unit" type="text" name="tags" value="${code.get('tags') }${tags }" placeholder="请输入代码可用标签，[用英文逗号间隔，最多5个]"/></td>
					<td class="td3">${tags_info }</td>
				</tr>
				<tr>
					<td class="td1">代码主体　</td>
					<td style="width:65%;">
						<textarea id="code-edit-area" style="width:100%;height: 250px;" name="content" placeholder="请输入代码主体内容">${code.get('content') }${content }</textarea>
					</td>
					<td class="td3">${content_info }</td>
				</tr>
				<tr>
					<td class="td1"></td>
					<td class="td2">
						<button class="btn btn-primary">　确　定　</button>　　　<a href="/code">返回代码列表</a>
					</td>
					<td class="td3"></td>
				</tr>
			</table>
		</form>
	</div>

	<jsp:include page="/WEB-INF/pages/include/copyright.jsp"></jsp:include>
</body>
</html>
